package com.tmeone.erpone.controller;


import com.tmeone.erpone.entity.JsonResult;
import com.tmeone.erpone.entity.ProcessStatus;
import com.tmeone.erpone.service.ITProductiveProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tmeone
 * @since 2021-04-19
 */
@RestController
public class TProductiveProcessController {

    @Autowired
    private ITProductiveProcessService itppService;

    /*
    * 根据订单Id得到生产过程
    *
    * */
    @GetMapping("/process")
    public JsonResult getProcessByOrderId(@RequestParam("orderId")String orderId){
        List<ProcessStatus> processByOrderId = itppService.getProcessByOrderId(orderId);
        return new JsonResult(1,processByOrderId);
    }

}
